<!DOCTYPE html>
<<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>展示页面</h1>
<a href="toAdd">添加</a>
<table border="1" cellspacing="0">
        <tr>
            <td>编号</td>
            <td>产品</td>
            <td>产品类型</td>
            <td>状态</td>
            <td>操作</td>
        </tr>
        <tr th:each="g : ${page.list}">
            <td th:text="${g.id}"></td>
            <td th:text="${g.title}"></td>
            <td th:text="${g.name}"></td>
            <td th:text='${g.state==0?"已上架":"已下架"}'
            >


            </td>
            <td>
                <a th:href="@{'toEdit?id='+${g.id}}">修改</a>
                <a th:href="@{'del?id='+${g.id}}">删除</a>
                <button><a th:href="@{'tos?id='+${g.id}}">上架</a></button>
                <button><a th:href="@{'tox?id='+${g.id}}">下架</a></button>
            </td>
        </tr>
</table>
<a th:href="'findAll?pageNum='+${page.firstPage}">首页</a>
<a th:href="'findAll?pageNum='+${page.prePage==0?1:page.prePage}">上一页</a>
<a th:href="'findAll?pageNum='+${page.nextPage==page.pages?page.pages:page.nextPage}">下一页</a>

<a th:href="'findAll?pageNum='+${page.lastPage}">尾页</a>
</body>
</html>